package com.anti.modular.sys;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description TODO
 * @Author anTi
 * @Date 2020-11-10
 */
public class TreeEntity {
    //菜单id
    private Long id;
    //菜单名称
    private String name;
    //级别
    private Integer level;
    //是否是菜单1:菜单,0:非菜单
    private String ismenu;
    //图标
    private String icon;
    //顺序
    private Integer num;
    //地址
    private String url;
    //父菜单id
    private Long pId;

    private List<TreeEntity> children;

    /**
     * 初始化子类
     */
    public void initChildren() {
        if (getChildren() == null) {
            this.setChildren(new ArrayList<>());
        }
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getIsmenu() {
        return ismenu;
    }

    public void setIsmenu(String ismenu) {
        this.ismenu = ismenu;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Long getpId() {
        return pId;
    }

    public void setpId(Long pId) {
        this.pId = pId;
    }

    public List<TreeEntity> getChildren() {
        return children;
    }

    public void setChildren(List<TreeEntity> children) {
        this.children = children;
    }
}
